package com.glodon.paas.framework.registry.core.type;

import com.glodon.paas.framework.registry.core.status.ServiceStatus;

import java.io.Serializable;

/**
 * Service basic infomation that stored as znode data.
 *
 * @author Don Li
 */
public final class ServiceBasic implements Serializable {

    private String id;
    private String name;
    private ServiceStatus status;
    private String healthCheck;
    private int availableInstances;

    public ServiceBasic() {
    }

    public ServiceBasic(String id, String name, String healthCheck) {
        this.id = id;
        this.name = name;
        this.healthCheck = healthCheck;
        this.status = ServiceStatus.UNAVAILABLE;
        this.availableInstances = 0;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ServiceStatus getStatus() {
        return status;
    }

    public void setStatus(ServiceStatus status) {
        this.status = status;
    }

    public String getHealthCheck() {
        return healthCheck;
    }

    public void setHealthCheck(String healthCheck) {
        this.healthCheck = healthCheck;
    }

    public int getAvailableInstances() {
        return availableInstances;
    }

    public void setAvailableInstances(int availableInstances) {
        this.availableInstances = availableInstances;
    }
}
